﻿using WeDonekRpc.SqlSugar.VirtualQuery;

namespace Basic.UserFormService.Model
{
    public class StatisticsBody
    {
        /// <summary>
        /// 数据ID
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 页ID
        /// </summary>
        public long PageId { get; set; }

        /// <summary>
        /// 表单ID
        /// </summary>
        public long? FormId { get; set; }

        /// <summary>
        /// 查询条件
        /// </summary>
        public QueryStruct Query { get; set; }

        public string ColName { get; set; }

        public Dictionary<long, ColTable> Cols { get; set; }

        public StatisticsBody Clone ()
        {
            return new StatisticsBody
            {
                ColName = this.ColName,
                Cols = this.Cols,
                FormId = this.FormId,
                Id = this.Id,
                PageId = this.PageId,
                Query = this.Query.Clone()
            };
        }
    }
}
